package com.situ.storehouse.service;

import java.util.List;


import com.situ.storehouse.dao.WaresDao;
import com.situ.storehouse.entity.Wares;

public class WaresServiceImpl implements WaresService {

	WaresDao dao=new WaresDao();

	@Override
	public void add(Wares wares) {
		dao.add(wares);
	}

	@Override
	public void delete(Integer id) {
		dao.delete(id);
	}

	@Override
	public void update(Wares wares) {
		dao.update(wares);
	}

	@Override
	public Wares select(Integer id) {
		return dao.select(id);
	}
	
	@Override
	public List<Wares> select(Integer page, Integer limit, String keyword) {
		page=limit*(page-1);
		List<Wares> list = dao.select(page,limit,keyword);
		return list;
	}

	@Override
	public long count(String keyword) {
		return dao.count(keyword);
	}

	@Override
	public List<Wares> selectAll() {
		return dao.selectAll();
		
	}




}
